<?
  		require_once(__DIR__ . '/../inc/Customers.php');
  		$row = GetCustomer($_REQUEST['id']);
		$del = array();
        if(isset($_POST['del']))
        {
				$row = GetCustomer($_REQUEST['id']);
                $del = Delete($row);
                if($del === true)
                {
                        header("Location: index.php");
                        die();
                }
        } else{
                $row = GetCustomer($_REQUEST['id']);
        }
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Delition of Customer: <?=$row['FirstName']?> <?=$row['LastName']?></title>
    <link rel="stylesheet" type="text/css" href="../inc/bootstrap.css">
    <style type="text/css" ">
        .error { color: red; }
    </style>
</head>

<body>
        <? include('../inc/header.php'); ?>
        <div class="container">
                        <? include('../inc/nav.php'); ?>
            <div id="contents">
				  <table class="table table-striped table-bordered table-condensed table-hover">
                	<tr>
                    	<th>Delition Detail</th>
                        
                    </tr>
					</table>		
                <table class="table table-striped table-bordered table-condensed table-hover">
                    <tr>
						<th>Id Number</th>
                        <th>First Name</th>
                        <th>Last Name</th>
                        <th>created_at</th>
                        <th>update_at</th>									       			
                    </tr>
                    <tr>
                        <td><?=$row['id']?></td>
					    <td><?=$row['FirstName']?></td>
                        <td><?=$row['LastName']?></td>
                        <td><?=$row['created_at']?></td>
                        <td><?=$row['updated_at']?></td>
                     </tr>
                </table>
                <form class="form-horizontal" method="post" action="">
                     <input class="btn btn-primary" type="submit" value="Delete Customer?" name="del" />
                </form>
           </div>
       </div>
</body>
</html>
